Field of the Invention
The present invention relates to an image processing apparatus that executes pattern matching based upon a pair of captured image data.
Description of Related Art
There has been known a technique of detecting an object that is an obstacle, such as a vehicle ahead or a traffic light, and making a control for avoiding a collision with the detected object and for keeping a safe distance between a vehicle and the vehicle ahead (for example, Japanese Patent No. 3349060 (Japanese Unexamined Patent Application Publication (JP-A) No. 10-283461)).
The distance between the vehicle and the vehicle ahead can be acquired from parallax of an object in a pair of image data that is captured at a different position. The parallax of the object in the pair of image data is derived based upon pattern matching between images. A general pattern matching is such that blocks with a predetermined size are compared (matched) between the images, and the blocks with the high correlation are specified. There is also a technique of executing the pattern matching by using a density histogram of the image (for example, JP-A No. 5-210737).
There is also a technique of geometrically correcting an optical positional deviation of the captured image before the pattern matching in order to enhance precision of the pattern matching (for example, Japanese Patent No. 3284190).
As a process of acquiring an image, her has been known a so-called Bayer array in which color filters of RGB signals, which are three primary colors, are regularly and exclusively arranged to plural light-receiving sections (photodiodes) corresponding to pixels that are arranged in a matrix, for example. In the Bayer array, at least one color phase of RGB is only acquired for each pixel. In general, a luminance value of unset (missing) color phase is interpolated based upon the adjacent pixels so as to reproduce color in each pixel. The position of each pixel whose color is reproduced is geometrically corrected as described above, and then, the pattern matching is executed.
However, the above-mentioned color reproduction is on the assumption that the original color of the target pixel, and the original color of the adjacent pixels are equal to each other. Therefore, when the colors of the adjacent pixels are different, or the object is different in the first place, the color is reproduced based upon the different color, which might cause false color. When the physical centroid of a pixel and the centroid of the color reproduced based upon this pixel are different from each other, the centroid of the color might be shifted due to the geometrical positional correction based upon the physical centroid of the pixel.
When a vehicle runs at night, an image is captured with an aperture being reduced (with the shutter being opened) in order to effectively acquire poor incident light. However, light of a light source in a detection region is too strong, so that a luminance value of an arbitrary color phase might be saturated.